/**
 * 
 */
package com.yidu.drug.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yidu.drug.dao.FilialeModelMapper;
import com.yidu.drug.dao.MemberModelMapper;
import com.yidu.drug.model.FilialeModel;
import com.yidu.drug.model.MemberModel;
import com.yidu.drug.service.MemberService;

/**
 * 会员管理的service实现类
 * @author 易玉凤
 * @date 2018年8月13日下午2:27:16
 * @version 1.0
 */
@Service
public class MemberServiceImpl implements MemberService{

	@Resource
	private MemberModelMapper memberModelMapper;
	
	@Override
	public List<MemberModel> findAll(MemberModel memberModel) {
		return memberModelMapper.findAll(memberModel);
	}

	@Override
	public Long findRows(MemberModel memberModel) {
		return memberModelMapper.findRows(memberModel);
	}

	@Override
	public MemberModel findByName(String memberName) {
		return memberModelMapper.selectByPrimaryKey(memberName);
	}

	@Override
	public int updateById(String memberId) {
		return memberModelMapper.updateById(memberId);
	}

	@Override
	public int save(MemberModel memberModel) {
		return memberModelMapper.insertSelective(memberModel);
	}

	@Override
	public int update(MemberModel memberModel) {
		return memberModelMapper.updateByPrimaryKeySelective(memberModel);
	}

	@Override
	public MemberModel findById(String memberId) {
		return memberModelMapper.selectByPrimaryKey(memberId);
	}

	@Override
	public List<MemberModel> findAllMember() {
		return memberModelMapper.findAllMember();
	}

	@Override
	public Integer sjhm(Long memberPhone) {
		
		return memberModelMapper.sjhm(memberPhone);
	}

	@Override
	public String findsjById(Long memberPhone) {

		return memberModelMapper.findsjById(memberPhone);
	}

	
}
